// This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface 
// (the "Fluent UI") and is provided only as referential material to supplement the 
// Microsoft Foundation Classes Reference and related electronic documentation 
// included with the MFC C++ library software.  
// License terms to copy, use or distribute the Fluent UI are available separately.  
// To learn more about our Fluent UI licensing program, please visit 
// http://msdn.microsoft.com/officeui.
//
// Copyright (C) Microsoft Corporation
// All rights reserved.

// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently

#pragma once

#ifndef _SECURE_ATL
#define _SECURE_ATL 1
#endif

#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN            // Exclude rarely-used stuff from Windows headers
#endif

#include "targetver.h"

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS      // some CString constructors will be explicit

// turns off MFC's hiding of some common and often safely ignored warning messages
#define _AFX_ALL_WARNINGS

#include <afxwin.h>         // MFC core and standard components
#include <afxext.h>         // MFC extensions


#include <afxdisp.h>        // MFC Automation classes



#ifndef _AFX_NO_OLE_SUPPORT
#include <afxdtctl.h>           // MFC support for Internet Explorer 4 Common Controls
#endif
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>             // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT


//remove warming

#pragma warning(disable:4018 )
#pragma warning(disable:4244 )
#pragma warning(disable:4996 )
#pragma warning(disable:4309 )
#pragma warning(disable:4800 )
#pragma warning(disable:4805 )
#pragma warning(disable:4715 )
#pragma warning(disable:4101 )

#include <afxcontrolbars.h>     // MFC support for ribbons and control bars

#include <mysql.h>

#define ID_ADMIN	1
#define ID_LEADER	2
#define ID_STAFF	3


#define  ID_PHONE		1
#define  ID_ACCESSORY	2
#define  ID_OTHER		3

enum view
{
	ID_VIEW_INFOR =0,
	ID_VIEW_GRAPH,
	ID_VIEW_STAFF,
	ID_VIEW_SETTING,
	ID_VIEW_SALARY,
	ID_VIEW_STORE ,
	ID_VIEW_GROUP,
	ID_VIEW_PRODUCT,
	ID_VIEW_PROVIDER,
	ID_VIEW_INPUT,
	ID_VIEW_OUPUT,
	ID_VIEW_REPORT,
	ID_VIEW_TRANS,
	ID_VIEW_CHECK,
	ID_VIEW_REMAIN_PLUS,
	ID_VIEW_CHECK_POINT,
	ID_VIEW_ACCOUNT,
	ID_VIEW_REMAIN,
	ID_WANRRANTY
};

enum report
{
	ID_INPUT_REPORT =0,
	ID_OUTPUT_REPORT,
	ID_TRANS_REPORT	
};



#include "Database_def.h"

#include "maskededit/OXMaskedEdit.h"
#include "RealObject/Staff.h"
#include "GridCtrl/CellTypes/GridURLCell.h"
#include "GridCtrl/CellTypes/GridCellCombo.h"
#include "GridCtrl/CellTypes/GridCellCheck.h"
#include "GridCtrl/CellTypes/GridCellNumeric.h"
#include "GridCtrl/CellTypes/GridCellDateTime.h"

#include <vector>
#include <map>
#include <typeinfo.h>
#include <algorithm>

#include "Manager.h"
#include "ManagerDoc.h"
#include "ManagerView.h"
#include "MainFrm.h"
using namespace std;
//Global variable
extern MYSQL *conn;
extern CStaff *g_pStaff;
extern CImageList *g_pImageProduct;
extern CString g_sHost;
extern CString g_sUser;
extern CString g_sDatabase;
extern CString g_sPass;

#define CSDL "personalmanager"



//Runtime function
CManagerApp* afxGetApp();
CMainFrame* afxGetMainFrame();

CManagerDoc* afxGetActiveDocument(CFrameWnd* pFrame);
CManagerView* afxGetActiveMainView(CFrameWnd* pFrameWnd);


#define KEY_POSITION		_T("SOFTWARE\\BLUESKY, Inc.\\Manager 2011") 
#define KEY_CONNECTION		_T("SOFTWARE\\BLUESKY, Inc.\\Manager 2011\\Connect") 
#define KEY_LIST_USER		_T("SOFTWARE\\BLUESKY, Inc.\\Manager 2011\\RecentUser") 
#define SUB_KEY_USER		_T("ListUser")
#define KEY_VERIFY			_T("VerifyKey")
#define KEY_STATUS		_T("Status")
#define KEY_HOST			_T("Host")
#define KEY_PASS			_T("Pass")
#define KEY_DATABASE		_T("Database")
#define KEY_USER			_T("CurrentUser")
#ifdef _UNICODE
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
#endif


